#include<bits/stdc++.h>
#include<ext/pb_ds/hash_policy.hpp>
#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define int long long
const int N = 5e6+5,base1 = 13331,mod1 = 998442353,base2 = 11451,mod2 = 147744151;
inline int qpow(int x,int y,int mod)
{
	int res = 1;
	while(y)
	{
		if(y&1) res = res*x%mod;
		y>>=1;
		x = x*x%mod;
	}
	return res;
}
inline int get(int x,int y){return x+y*1000000009;}
int n,k,lt,rt,mul1 = 1,inv1,mul2 = 1,inv2,h1,h2;
string s,t;
gp_hash_table<int,int> mp;
int las[N],cnt;
vector<int> vec[N];
signed main()
{
	freopen("string.in","r",stdin);
	freopen("string.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cin>>n>>k>>lt>>rt>>s,s = ' '+s;
	for(int i = 1;i<=k;i++)
		mul1 = mul1*base1%mod1,(h1+=mul1*s[i])%=mod1,
		mul2 = mul2*base2%mod2,(h2+=mul2*s[i])%=mod2;
	inv1 = qpow(base1,mod1-2,mod1),inv2 = qpow(base2,mod2-2,mod2);
	for(int i = k;i<n;i++)
	{
		if(i!=k)
		{
			(h1+=mod1-base1*s[i-k]%mod1)%=mod1,(h1*=inv1)%=mod1,(h1+=mul1*s[i])%=mod1;
			(h2+=mod2-base2*s[i-k]%mod2)%=mod2,(h2*=inv2)%=mod2,(h2+=mul2*s[i])%=mod2;
		}
		int h = get(h1,h2);
		if(!mp[h]) mp[h] = ++cnt,vec[cnt].resize(26);
		int id = mp[h];
		vec[id][s[i+1]-'a']++;
	}
	int p = -1,len;
	for(int i = n;i<=rt;i++)
	{
		(h1+=mod1-base1*s[i-k]%mod1)%=mod1,(h1*=inv1)%=mod1,(h1+=mul1*s[i])%=mod1;
		(h2+=mod2-base2*s[i-k]%mod2)%=mod2,(h2*=inv2)%=mod2,(h2+=mul2*s[i])%=mod2; 
		int h = get(h1,h2);
		if(!mp[h]) mp[h] = ++cnt,vec[cnt].resize(26);
		int id = mp[h];
		if(las[id])
		{
			len = i-las[id];
			break;
		}
		las[id] = i;
		int mx = 0;
		for(int i = 1;i<26;i++) if(vec[id][i]>vec[id][mx]) mx = i;
		vec[id][mx]++;
		s+=mx+'a';
		p = i;
	}
//	cout<<s<<'\n';
	if(p==rt)
	{
		for(int i = lt;i<=rt;i++) cout<<s[i];
		return 0;
	}
	for(int i = lt;i<=p;i++)
		t+=s[i];
//	p-len+1~p
	int fir = p-len+1;
	for(int i = max(p+1,lt);i<=rt;i++)
		t+=s[(i-fir)%len+fir];
	cout<<t;
	return 0;
}

